package com.example.rendezhao.myapplication;

import org.xutils.DbManager;
import org.xutils.db.annotation.Column;
import org.xutils.db.annotation.Table;
import org.xutils.ex.DbException;

import java.util.List;

/**
 * Created by RendeZhao on 2017-04-29.
 */

@Table(name = "tenant")
public class Tenant {
    @Column(name = "ID", isId = true, autoGen = true)
    private int id;

    public static List<Tenant> getParent(DbManager db) throws DbException {
        return db.findAll(Tenant.class);
    }

    public void save(DbManager db) throws DbException {
        db.save(this);
    }

    @Column(name = "name")
    private String name;

    @Column(name = "shortName")
    private String shortName;
    @Column(name = "tenant")
    private String tenant;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getShortName() {
        return shortName;
    }

    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    public String getTenant() {
        return tenant;
    }

    public void setTenant(String tenant) {
        this.tenant = tenant;
    }
}
